package douyin;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSON;

import cn.zhuzi.douyin.bean.Mp4Bean;
import cn.zhuzi.douyin.bean.Mp4Parent;
import cn.zhuzi.douyin.bean.Play_addr;

public class DemoForJsonPase {
	public static void main(String[] args) {

		Play_addr play_addr = new Play_addr();
		play_addr.setUri("wwww.qianlicao.com");
		List<String> list = new ArrayList<String>();
		list.add("qianlicao51");
		list.add("451");
		play_addr.setUrl_list(list);

		Mp4Bean mp4Bean = new Mp4Bean();
		mp4Bean.setPlay_addr(play_addr);

		Mp4Parent pa = new Mp4Parent();
		pa.setVideo(mp4Bean);

		System.out.println(JSON.toJSONString(pa));

		String jsonString = "{'video':{'play_addr':{'uri':'wwww.qianlicao.com','url_list':['qianlicao51','451']}}}";

		System.out.println(JSON.parseObject(jsonString, Mp4Parent.class).getVideo().getPlay_addr().getUri());

	}
}
